-
Notifications
You must be signed in to change notification settings - Fork 9
fix: prioritize custom value provider when extracting column values #181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThe Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~7 minutes Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🧰 Additional context used🧠 Learnings (2)📓 Common learningssrc/main/java/com/flowingcode/vaadin/addons/gridexporter/GridExporter.java (2)Learnt from: javier-godoy Learnt from: javier-godoy 🔇 Additional comments (1)
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes the value extraction logic for grid columns to properly prioritize custom value providers. When a custom value provider is defined, it now takes precedence over all other extraction methods, with null values being handled by the nullValueSupplier if available.
| return value; | ||
| } | ||
|
|
Copilot
AI
Jul 25, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The early return should be moved outside the if block to ensure it's always executed when a custom value provider exists, regardless of whether the value is null or not.
| return value; | |
| } | |
| } | |
| if (value != null) { | |
| return value; | |
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The early return must stay inside the if (customVP != null) block to ensure no fallback logic is applied when a custom provider is present, even if its value is null.
|
@coderabbitai review |
✅ Actions performedReview triggered.
|



Ensure that when a custom value provider is defined for a column, its result is used exclusively. If the provider returns null, the nullValueSupplier is applied (if available). Other extraction strategies are skipped in this case.
Summary by CodeRabbit